mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-23 04:42:06 +01:00
Add toString() to SessionKey
This commit is contained in:
parent
405c7225f6
commit
8ff405d6ad
1 changed files with 6 additions and 0 deletions
|
@ -7,6 +7,7 @@ package org.pgpainless.util;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
import org.bouncycastle.openpgp.PGPSessionKey;
|
import org.bouncycastle.openpgp.PGPSessionKey;
|
||||||
|
import org.bouncycastle.util.encoders.Hex;
|
||||||
import org.pgpainless.algorithm.SymmetricKeyAlgorithm;
|
import org.pgpainless.algorithm.SymmetricKeyAlgorithm;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -57,4 +58,9 @@ public class SessionKey {
|
||||||
System.arraycopy(key, 0, copy, 0, copy.length);
|
System.arraycopy(key, 0, copy, 0, copy.length);
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "" + getAlgorithm().getAlgorithmId() + ":" + Hex.toHexString(getKey());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue