Package com.easydesk.attribute
Class EncryptAttribute
- All Implemented Interfaces:
Viewable,Cacheable,Observed,Retrievable,Serializable,ColumnAccessByName,ObjectModel,Persistent
index 는 Hash 처리한다.
db 에는 encryption 하여 저장한다.
- Version:
- $Revision: 1.17 $ $Date: 2008/12/25 04:03:44 $
- Author:
- Youngho Cho
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.easydesk.om.AttributeValue
AttributeValue.AccessEnum -
Field Summary
Fields inherited from class com.easydesk.om.AttributeValue
activitySet, chainedFields inherited from interface com.easydesk.validator.Retrievable
KEY_SEPERATOR -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.easydesk.attribute.HashedStringAttribute
getDisplayedValue, getDisplayedValue, getPassword, setPassword, toHashedString, toHashedStringMethods inherited from class com.easydesk.attribute.StringAttribute
getLocalizedValue, getLocalizedValue, hasValueMethods inherited from class com.easydesk.attribute.FreeFormAttribute
getFormatter, init, loadResources, setResourcesMethods inherited from class com.easydesk.om.AttributeValue
alwaysNeedActivity, clear, copy, copy, endActivitySet, getActivity, getActivityDescription, getAttachment, getChainedValue, getChainedValue, getChainedValue, getInputValue, getLocalizedValue, getLocalizedValue, getLocalizedValue, getLocalizedValues, getLocalizedValues, getMethodCache, getModuleAttribute, getNewInstance, getNewInstance, getNumericValues, getNumericValues, getNumericValuesAsString, getNumericValuesAsString, getObserverOption, getOptionIdAsString, getOptionIds, getOptionIds, getOptionIdsAsString, getOptionIdsAsString, getOptionValues, getPossibleTransitionCount, getPossibleTransitionCount, getPrimitiveOptionIds, getPrimitiveUserIds, getQueryKey, getRelativePath, getRelativePath, getRepository, getResource, getTransactionId, getUser, getUserIds, getValueList, getValueList, getValues, getValues, getValuesAsString, getValuesAsString, hasAlreadyChained, isModified, isQuickSearchAttribute, isSet, isSetOnly, needActivity, performAfter, performBefore, register, save, setActivity, setActivityDescription, setAttachment, setChainedValue, setInputValue, setNumericValue, setNumericValueOnly, setNumericValues, setOptionId, setOptionIdOnly, setOptionIds, setOptionValues, setPrimitiveOptionIds, setPrimitiveUserIds, setProperties, setTransactionId, setUser, setUserId, setUserIdOnly, setUserIds, setValue, setValueOnly, setValues, startActivitySet, toStringMethods inherited from class com.easydesk.om.BaseAttributeValue
copy, copy, copyInto, copyInto, copyInto, copyInto, equals, getAttribute, getAttribute, getAttributeId, getAttributeOption, getAttributeOption, getByName, getByPeerName, getByPosition, getDepend, getDepend, getDependId, getEasyDeskUserImpl, getEasyDeskUserImpl, getFieldNames, getForeignKeyForAttribute, getForeignKeyForAttributeOption, getForeignKeyForDepend, getForeignKeyForEasyDeskUserImpl, getForeignKeyForItem, getItem, getItem, getItemId, getNumericValue, getOptionId, getPeer, getPrimaryKey, getTableMap, getUserId, getValue, getValueId, hashCode, isCacheOnSave, isDeleted, isLoading, isModified, isNew, isRemoved, isSaving, resetModified, save, save, setAttribute, setAttributeId, setAttributeKey, setAttributeOption, setAttributeOptionKey, setByName, setByPeerName, setByPosition, setDeleted, setDepend, setDependId, setDependKey, setEasyDeskUserImpl, setEasyDeskUserImplKey, setItem, setItemId, setItemKey, setLoading, setModified, setNew, setPrimaryKey, setPrimaryKey, setRemoved, setSaving, setValueId, valueEqualsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.easydesk.attribute.Viewable
getComponentName
-
Constructor Details
-
EncryptAttribute
public EncryptAttribute()새로운EncryptAttribute인스턴스를 생성한다.
-
-
Method Details
-
setEncrypt
plain text password 를 encryptPassword 로 변경 저장한다. 현재는 구현되어 있지 않다.- Parameters:
plain- text- Throws:
GeneralSecurityException- 암호화 중 오류가 발생한 경우UnsupportedOperationException- 항상 발생 (미구현)
-
toHash
설정된 plain text 의 hash 값을 구한다.- Returns:
- Base64 로 인코딩된 hash 값
- Throws:
GeneralSecurityException- hash 알고리즘을 사용할 수 없는 경우
-
toHash
주어진 문자열의 hash 값("SHA-256")을 Base64 로 인코딩하여 구한다.- Parameters:
plain- hash 할 문자열- Returns:
- Base64 로 인코딩된 hash 값
- Throws:
GeneralSecurityException- hash 알고리즘을 사용할 수 없는 경우
-