Java Code Examples for org.bouncycastle.util.Strings

Following code examples demonstrate how to use org.bouncycastle.util.Stringsfrom android. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use org.bouncycastle.util.Stringsand various code implementation of this class.

    
    public String getID()
    {
        return Strings.fromUTF8ByteArray(idData);
    } 


    
    public UserIDPacket(
        String    id)
    {
        this.idData = Strings.toUTF8ByteArray(id);
    } 

    
    public String getID()
    {
        return Strings.fromUTF8ByteArray(data);
    } 

    
    public SignerUserID(
        boolean    critical,
        String     userID)
    {
        super(SignatureSubpacketTags.SIGNER_USER_ID, critical, false, Strings.toUTF8ByteArray(userID));
    } 

    }

    public long getLength()
    {
        return Strings.toUTF8ByteArray(value).length;
    } 

    }

    public BasicTlsPSKIdentity(String identity, byte[] psk)
    {
        this.identity = Strings.toUTF8ByteArray(identity);
        this.psk = Arrays.clone(psk);
    } 

Advertisement
Javadoc
String utilities.
Advertisement