Skip to content
Commit 2cd7673d authored by Alex Klyubin's avatar Alex Klyubin
Browse files

Switch from getSpi to getCurrentSpi.

Crypto primitives' getSpi has a side-effect which modifies the state
of the primitive: it selects an SPI implementation if it hasn't been
selected yet (e.g., Cipher.getInstance("AES") doesn't select an SPI
implementation until Cipher.init). The new method getCurrentSpi has
no side-effects: it simply returns null if no SPI implementation is
selected. The switch to getCurrentSpi lets us avoid side-effects and
throw a more pertinent exception when no SPI is yet selected.

(cherry-picked from bdc1382a)

Bug: 18088752
Change-Id: Ib369c7e988329315075aa4e18f720d86f3d96a93
parent beda8613
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment