Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Get Started
Design and Develop
Publish
Reference
Support
Native
Skip to main content

Interface IKeyWithPurpose

interface IKeyWithPurpose
Extends com.amazon.apmf.IStandard Interface to be implemented by keys supporting the purposes attribute.

Methods

getPurposes()

string[] getPurposes()
Get the purposes enabled for this key.

Returns

string[] An array of strings representing key purposes.

hasPurpose()

bool hasPurpose(string purpose)
Check if a particular purpose is enabled for this key.

Parameters

purpose
string — Required A string containing a key purpose.

Returns

bool true if the purpose is enabled for this key, false otherwise.

Constants

DECRYPT

string = "DECRYPT"
A key that can be used for decryption.

ENCRYPT

string = "ENCRYPT"
A key that can be used for encryption.

SIGN

string = "SIGN"
A key that can be used for signing.

VERIFY

string = "VERIFY"
A key that can be used for verifying.

WRAP

string = "WRAP"
A key that can be used for wrapping another key.

UNWRAP

string = "UNWRAP"
A key that can be used for unwrapping another key.

DERIVE

string = "DERIVE"
A key that can be used for deriving another key.
Last modified on October 29, 2026