패키지 | mx.data.crypto |
클래스 | public class EncryptionKeyGenerator |
상속 | EncryptionKeyGenerator Object |
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This class uses techniques and algorithms that are designed for maximum data privacy and security. Use this class to generate an encryption key if your application requires data to be encrypted on a per-user level (in other words, if only one user of the application should be able to access his or her data). In some situations you may also want to use per-user encryption for data even if the application design specifies that other users can access the data. For more information, see "Considerations for using encryption with a database" in the guide "Developing Adobe AIR Applications with Flex."
The generated encryption key is based on a password that you provide. For any given password, in the same AIR application running in the same user account on the same machine, the encryption key result is the same.
To generate an encryption key from a password, use the getEncryptionKey()
method. To confirm that a password is a "strong" password before calling the
getEncryptionKey()
method, use the validateStrongPassword()
method.
In addition, the EncryptionKeyGenerator includes a utility constant,
ENCRYPTED_DB_PASSWORD_ERROR_ID
. This constant matches the error ID of
the SQLError error that occurs when code that is attempting to open an encrypted database
provides the wrong encryption key.
This class is designed to create an encryption key suitable for providing the highest level of data privacy and security. In order to achieve that level of security, a few security principles must be followed:
- Your application should never store the user-entered password
- Your application should never store the encryption key returned by the
getEncryptionKey()
method. - Instead, each time the user runs the application and attempts to access the database,
your application code should call the
getEncryptionKey()
method to regenerate the encryption key.
For more information about data security, and an explanation of the security techniques used in the EncryptionKeyGenerator class, see "Example: Generating and using an encryption key" in the guide "Developing Adobe AIR Applications with Flex."
메서드 | 정의 주체 | ||
---|---|---|---|
Creates a new EncryptionKeyGenerator instance. | EncryptionKeyGenerator | ||
Uses a password to generate a 16-byte encryption key. | EncryptionKeyGenerator | ||
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | ||
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | ||
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | ||
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | ||
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | ||
지정된 객체의 문자열 표현을 반환합니다. | Object | ||
Checks a password and returns a value indicating whether the password is a "strong"
password. | EncryptionKeyGenerator | ||
지정된 객체의 프리미티브 값을 반환합니다. | Object |
상수 | 정의 주체 | ||
---|---|---|---|
ENCRYPTED_DB_PASSWORD_ERROR_ID : uint = 3138 [정적]
This constant matches the error ID (3138) of the SQLError error that occurs when
code that is attempting to open an encrypted database provides the wrong
encryption key. | EncryptionKeyGenerator |
EncryptionKeyGenerator | () | 생성자 |
public function EncryptionKeyGenerator()
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Creates a new EncryptionKeyGenerator instance.
getEncryptionKey | () | 메서드 |
public function getEncryptionKey(password:String, overrideSaltELSKey:String = null):ByteArray
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Uses a password to generate a 16-byte encryption key. The return value is suitable to use as an encryption key for an encrypted AIR local SQL (SQLite) database.
For any given
password, calling the getEncryptionKey()
method from the same AIR application
running in the same user account on the same machine, the encryption key result is
the same.
This method is designed to create an encryption key suitable for providing the highest level of data privacy and security. In order to achieve that level of security, your application must follow several security principles:
- Your application can never store the user-entered password
- Your application can never store the encryption key returned by the
getEncryptionKey()
method. - Instead, each time the user runs the application and attempts to access the database,
call the
getEncryptionKey()
method to regenerate the encryption key.
For more information about data security, and an explanation of the security techniques used in the EncryptionKeyGenerator class, see "Example: Generating and using an encryption key" in the guide "Developing Adobe AIR Applications with Flex."
매개 변수
password:String — The password to use to generate the encryption key.
| |
overrideSaltELSKey:String (default = null ) — The EncryptionKeyGenerator creates and stores a random value
(known as a salt) as part of the process of
generating the encryption key. The first time an application
calls the getEncryptionKey() method, the salt
value is created and stored in the AIR application's encrypted
local store (ELS). From then on, the salt value is loaded from the
ELS.
If you wish to provide a custom String ELS key for storing
the salt value, specify a value for the |
ByteArray — The generated encryption key, a 16-byte ByteArray object.
|
오류
ArgumentError — If the specified password is not a "strong" password according to the
criteria explained in the validateStrongPassword()
method description
| |
ArgumentError — If a non-null value is specified for the overrideSaltELSKey
parameter, and the value is an empty String ("" )
|
validateStrongPassword | () | 메서드 |
public function validateStrongPassword(password:String):Boolean
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
런타임 버전: | Flash Player 9, AIR 1.1 |
Checks a password and returns a value indicating whether the password is a "strong" password. The criteria for a strong password are:
- Minimum 8 characters
- Maxmium 32 characters
- Contains at least one lowercase letter
- Contains at least one uppercase letter
- Contains at least one number or symbol character
매개 변수
password:String — The password to check
|
Boolean — A value indicating whether the password is a strong password (true )
or not (false ).
|
ENCRYPTED_DB_PASSWORD_ERROR_ID | 상수 |
public static const ENCRYPTED_DB_PASSWORD_ERROR_ID:uint = 3138
언어 버전: | ActionScript 3.0 |
제품 버전: | Adobe Digital Enterprise Platform Data Services for Java EE 3.1 |
런타임 버전: | Flash Player 9, AIR 1.1 |
This constant matches the error ID (3138) of the SQLError error that occurs when code that is attempting to open an encrypted database provides the wrong encryption key.
Tue Jun 12 2018, 03:17 PM Z